<p><strong>This page describes a method to migrate via EverNote Legacy, but this app is no longer available/working.</strong>
</p>
<h2>Prep Onenote notes for best compatibility</h2>
<ul>
  <li>Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will
    get imported into trilium as an image which clutters the Trilium tree somewhat)</li>
  <li>Make sure to use Onenote headings where applicable (These will be carried
    over correctly into Trilium)</li>
  <li>Remove extra whitespace in Onenote (Whitespace seems to be more noticible
    in Trilium, so removing it now will make it look nicer in trilium)</li>
  <li>If possible, try to avoid very long Onenote pages. Trilium works best
    with shorter concise pages with any number of sub or (sub-sub...) pages.</li>
  <li>Make sure numbered lists don't have unusual spaces between items in the
    list (Sometimes the numbered list will start at 1 again in Trilum if there
    is an extra space in the list in OneNote).</li>
</ul>
<h2>Migration Procedure</h2>
<h3>Import into Evernote from OneNote:</h3>
<ul>
  <li>Install <a href="https://web.archive.org/web/20230327110646/https://help.evernote.com/hc/en-us/articles/360052560314">Evernote Legacy</a>.
    Current versions of Evernote do not have this functionality. (Requires
    Evernote account, but import works without internet connection - be sure
    to NOT sync notes to Evernote!).</li>
  <li>In evernote navigate to File &gt; Import &gt; Onenote &gt; Notebook &gt;
    Section &gt; OK</li>
</ul>
<p>If exporting all sections at a time, they will not be grouped in folders
  - they will all be added to a single folder, but the order will be kept,
  so you can re-group into folders after importing to Trilium</p>
<h3>Export from Evernote</h3>
<ul>
  <li>Right click on the created notebook in Evernote and choose "Export Notes…"</li>
  <li>Use the default export format of .enex</li>
</ul>
<h3>Cleanup enex file (optional)</h3>
<ul>
  <li>
    <p>If the Onenote header (that is at the top of each Onenote page) is not
      desired, you can use the following regex to remove them in a text editor
      like VsCode:</p>
    <p>Find (using regex): <code>.&lt;div.*&gt;&lt;h1</code> Replace with: <code>&lt;h1</code>
    </p>
  </li>
</ul>
<h3>Import into Trilium</h3>
<ul>
  <li>In Trilium, right click on the root node and choose Import (all default
    options should be fine).</li>
  <li>Select the .enex file exported from Evernote</li>
  <li>Be patient. Large .enex files may take a few minutes to process</li>
  <li>Repeat import for each .enex file</li>
</ul>
<h2>Other importing notes:</h2>
<ul>
  <li>Centered text in Onenote will be left-justified after importing into Trilium</li>
  <li>Internal onenote links will obviously be broken, but the link still exists
    so you can do a search in Trilium to find all onenote:// links and then
    re-link to the proper Trilium page (there is no way to link to a paragraph
    in trilium, so it's good to keep trilium pages short so links point to
    a small chunk of information instead of a massive note)</li>
  <li>Text colors, highlights, and formatting generally carries over well</li>
  <li>Revision history will be lost, but any new revisions will be tracked in
    Trilium</li>
  <li>The structure of notes are not maintained exactly, so if you had sub-notes
    in Onenote, you may have to re-arrange the notes accordingly (This is easy
    since the order of the notes is preserved).</li>
  <li>Evernote tags are created for each "section" in OneNote and these tags
    are carried over to Trilium as attributes
    <ul>
      <li>If the tags are not desired, you can turn them off in the Evernote export
        options.</li>
    </ul>
  </li>
  <li>If the "Created with OneNote" text is not desired, do a find/replace in
    the enex files before importing to Trilium</li>
  <li>Some links will be disabled (not clickable) when importing from enex.</li>
  <li>Files, screenshots, and attachments are all preserved (This is the only
    one-note export option that seems to preserve all of these).</li>
</ul>